#include "Sprite.h"

std::vector<jfw::Sprite*> jfw::Sprite::SpriteList;
extern jfw::Engine* pEngine;

jfw::Sprite::Sprite()
{
    SpriteList.push_back(this);
}

jfw::Sprite::~Sprite()
{
    SpriteList.clear();
}

void jfw::Sprite::DrawAll()
{
    for(unsigned int i=0; SpriteList.size()>i; ++i)
    {
        pEngine->App.Draw(*(SpriteList[i]));
    }
}
